<%@ page language="java" pageEncoding="UTF-8"
	errorPage="../../defaultException.jsp"%>
<%@include file="../../tags.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>添加国家信息</title>
<%@include file="../../head.jsp"%>
</head>
<body>
		<form id="fm" method="post" enctype="multipart/form-data">
			<table>
				
				<input name="type" type="hidden" value="2">
				<tr>
					<td><label>归属目的地：</label></td>
					<td>
						<input  id="dataId" required="true" />
					</td>
					
				</tr>
				<tr>
				<td><label>归属酒店：</label></td>
					<td>
						<input id="hotelId" name="dataId" class="easyui-combobox"  required="true" />
						<input id="hotelName" name="appName" type="hidden" />
					</td>
					
				</tr>
			</table>
		</form>
		<script type="text/javascript">
		
		//初始化目的地信息
		$('#dataId').combobox({
			url : '${cpath }/admin/app/all/dest',
			valueField : 'destId',
			textField : 'zhname',
			editable : false,
			 onSelect: function(rec){
				chooseInfo(rec);
			 }

		});
		
		function chooseInfo(rec){
			 
			//初始化酒店信息
				$('#hotelId').combobox({
					url : '${cpath }/admin/app/all/hotel?destId='+rec.destId,
					valueField : 'hotelId',
					textField : 'zhname',
					editable : false,
					 onSelect: function(rec){
						 $("#hotelName").val(rec.zhname);
					 }

				});
		}
	</script>
	<style type="text/css">
			#fm {
				margin: 0;
				padding: 40px 40px;
			}
			
			.ftitle {
				font-size: 14px;
				font-weight: bold;
				padding: 5px 0;
				margin-bottom: 10px;
				border-bottom: 1px solid #ccc;
			}
			
			.fitem {
				margin-bottom: 5px;
			}
			
			.fitem label {
				display: inline-block;
				width: 90px;
			}
			
		 </style>
</body>
</html>